Skip to content

fix: remove ^orphan_file ext4 flag unsupported by older e2fsprogs#2192

Merged
arkamar merged 1 commit into
mainfrom
fix/remove-orphan-file-ext4-flag
Mar 20, 2026
Merged

fix: remove ^orphan_file ext4 flag unsupported by older e2fsprogs#2192
arkamar merged 1 commit into
mainfrom
fix/remove-orphan-file-ext4-flag

Conversation

@arkamar

@arkamar arkamar commented Mar 20, 2026

Copy link
Copy Markdown
Member

Production orchestrators run e2fsprogs < 1.47.0 which does not recognize the orphan_file feature. Passing ^orphan_file to mkfs.ext4 on these older versions causes an "Invalid filesystem option set" error because the feature is entirely unknown, not just unsupported. Since orphan_file is only a default in e2fsprogs >= 1.47.0.

Fixes: 5adcb7a ("feat: reserve disk space for guest OS during template build (#2082)")


Note

Low Risk
Low risk change limited to template filesystem creation flags; main impact is ext4 feature set selection during mkfs.ext4 runs.

Overview
Removes the ^orphan_file feature toggle from the mkfs.ext4 invocation during template ext4 creation so template builds work with older e2fsprogs versions where orphan_file is an unknown option and would otherwise cause mkfs.ext4 to fail.

Written by Cursor Bugbot for commit 4a75a20. This will update automatically on new commits. Configure here.

Production orchestrators run e2fsprogs < 1.47.0 which does not recognize
the orphan_file feature. Passing ^orphan_file to mkfs.ext4 on these
older versions causes an "Invalid filesystem option set" error because
the feature is entirely unknown, not just unsupported. Since orphan_file
is only a default in e2fsprogs >= 1.47.0.

Fixes: 5adcb7a ("feat: reserve disk space for guest OS during template build (#2082)")
// guest tools fail with "unsupported read-only feature(s)".
// See https://e2fsprogs.sourceforge.net/e2fsprogs-release.html#1.47.0
"^orphan_file",
}, ","),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing ^orphan_file entirely fixes the host-side error on e2fsprogs < 1.47.0, but reintroduces the original problem that PR #2082 was solving: on hosts with e2fsprogs >= 1.47.0, orphan_file will now be enabled by default in the filesystem, causing older guests (Ubuntu 22.04, Debian 11) to fail with unsupported read-only feature(s). The safe fix would be to detect host e2fsprogs version at runtime and conditionally pass ^orphan_file only when >= 1.47.0, or to use tune2fs -O ^orphan_file post-creation (which may handle the unknown-feature case more gracefully). As-is, this is a regression for anyone running newer e2fsprogs on the host with older-e2fsprogs guests.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4a75a20d35

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines 57 to 58
"sparse_super2",

// Disabled for compatibility with older guest e2fsprogs (Ubuntu 22.04, Debian 11).
// orphan_file was added as default in e2fsprogs >= 1.47.0; without disabling it,
// guest tools fail with "unsupported read-only feature(s)".
// See https://e2fsprogs.sourceforge.net/e2fsprogs-release.html#1.47.0
"^orphan_file",
}, ","),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep orphan_file disabled when building on newer hosts

If build-reserved-disk-space-mb is enabled and this runs on a builder whose mkfs.ext4 defaults orphan_file back on, the filesystem becomes unreadable to older guest tune2fs binaries again. We still run tune2fs -r /dev/vda inside the sandbox during post-processing (packages/orchestrator/pkg/template/build/phases/finalize/builder.go:222-230, packages/orchestrator/pkg/template/build/sandboxtools/command.go:237-263), so those builds will start failing with unsupported read-only feature(s) as soon as a newer e2fsprogs host is introduced. This fixes the current old-host mkfs.ext4 error by making the image feature set host-version-dependent again.

Useful? React with 👍 / 👎.

@jakubno jakubno left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix for all version coming later

@arkamar arkamar enabled auto-merge (squash) March 20, 2026 19:13
@arkamar arkamar merged commit 9f4ed66 into main Mar 20, 2026
37 checks passed
@arkamar arkamar deleted the fix/remove-orphan-file-ext4-flag branch March 20, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants